using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class SM_PKT_PricingMap : EntityTypeConfiguration<SM_PKT_Pricing>
    {
        public SM_PKT_PricingMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Reference)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("SM_PKT_Pricing");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.OverHead).HasColumnName("OverHead");
            this.Property(t => t.Perc).HasColumnName("Perc");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.Value).HasColumnName("Value");
            this.Property(t => t.Currency).HasColumnName("Currency");
            this.Property(t => t.Reference).HasColumnName("Reference");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.CreatedBY).HasColumnName("CreatedBY");
            this.Property(t => t.CreatedON).HasColumnName("CreatedON");
            this.Property(t => t.IP_UID2).HasColumnName("IP_UID2");
            this.Property(t => t.SPID).HasColumnName("SPID");
            this.Property(t => t.C_deleted).HasColumnName("_deleted");
        }
    }
}
